home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / OWLINC.PAK / COMPAT.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  3KB  |  103 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1992, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   10.4  $
  6. //
  7. //----------------------------------------------------------------------------
  8. #if !defined(OWL_COMPAT_H)
  9. #define OWL_COMPAT_H
  10.  
  11.  
  12. #if !defined(BI_OLDNAMES)
  13. # define BI_OLDNAMES
  14. #endif
  15.  
  16. #if !defined(OWL_DEFS_H)
  17. # include <owl/defs.h>
  18. #endif
  19.  
  20. #if defined(BI_NAMESPACE)
  21. namespace OWL {
  22. #endif
  23.  
  24. //
  25. // struct TMessage
  26. // ~~~~~~ ~~~~~~~~
  27. struct TMessage {
  28.   HWND  Receiver;
  29.   uint16  Message;
  30.  
  31.   union {
  32.     uint16  WParam;
  33.  
  34.     struct tagWP {
  35.       uint8 Lo;
  36.       uint8 Hi;
  37.     } WP;
  38.   };
  39.  
  40.   union {
  41.     uint32  LParam;
  42.  
  43.     struct tagLP {
  44.       uint16 Lo;
  45.       uint16 Hi;
  46.     } LP;
  47.   };
  48.  
  49.   long  Result;
  50. };
  51.  
  52. class _OWLCLASS TWindow;
  53. TMessage _OWLFUNC __GetTMessageWin(TWindow* win);
  54. #define __GetTMessage() __GetTMessageWin(this)
  55.  
  56. //
  57. // Constants for application messages
  58. //
  59. #define WM_FIRST        0x0000  // 0x0000- 0x7FFF window messages
  60. #define WM_INTERNAL     0x7F00  // 0x7F00- 0x7FFF reserved for internal use
  61. #define ID_FIRST        0x8000  // 0x8000- 0x8FFF child id messages
  62. #define ID_INTERNAL     0x8F00  // 0x8F00- 0x8FFF reserved for internal use
  63. #define NF_FIRST        0x9000  // 0x9000- 0x9FFF notification messages
  64. #define NF_INTERNAL     0x9F00  // 0x9F00- 0x9FFF reserved for internal use
  65. #define CM_FIRST        0xA000  // 0xA000- 0xFFFF command messages
  66. #define CM_INTERNAL     0xFF00  // 0xFF00- 0xFFFF reserved for internal use
  67. #define WM_COUNT        0x8000  // num of window msgs
  68. #define ID_COUNT        0x1000  // num of child id msgs
  69. #define NF_COUNT        0x1000  // num of notification msgs
  70. #define CM_COUNT        0x6000  // num of command msgs
  71.  
  72. #define WM_RESERVED             WM_INTERNAL - WM_FIRST
  73.  
  74. #define ID_RESERVED             ID_INTERNAL - ID_FIRST
  75. #define ID_FIRSTMDICHILD        ID_RESERVED + 1
  76. #define ID_MDICLIENT            ID_RESERVED + 2
  77.  
  78. #define CM_RESERVED             CM_INTERNAL - CM_FIRST
  79.  
  80. //
  81. // Error conditions
  82. //
  83. #define EM_INVALIDCHILD         -1
  84. #define EM_INVALIDCLIENT        -2
  85. #define EM_INVALIDMAINWINDOW    -3
  86. #define EM_INVALIDMODULE        -4
  87. #define EM_INVALIDWINDOW        -5
  88. #define EM_OUTOFMEMORY          -6
  89.  
  90. typedef int _FAR & Rint;
  91. typedef int _FAR * Pint;
  92. typedef void _FAR * Pvoid;
  93. typedef void _FAR * _FAR & RPvoid;
  94. typedef char _FAR * Pchar;
  95. typedef const char _FAR * PCchar;
  96. typedef const void _FAR * PCvoid;
  97.  
  98. #if defined(BI_NAMESPACE)
  99. } // namespace OWL
  100. #endif
  101.  
  102. #endif  // OWL_COMPAT_H
  103.